<?php
/**
 * 富文本编辑器挂件 EditorWidget.class.php
 */
namespace Admin\Widget;
use Think\Controller;
class EditorWidget extends Controller {
    /**kindeditor编辑器
     * @param $name textarea表单name名
     * @param string $width 编辑器宽度，单位px或%
     * @param string $height 编辑器高度，单位px或%
     */
    public function kindeditor ($name, $content = '', $width = '100%', $height = '600px'){

        $this->assign('name', $name);
        $this->assign('content', $content);
        $this->assign('width', $width);
        $this->assign('height', $height);

        $this->display('Widget:kindeditor');
    }

    /**百度编辑器
     * @param $name 表单name名
     * @param string $width 编辑器宽度，单位px或%
     * @param string $height 编辑器高度，单位px或%
     */
    public function ueditor($name, $content = '', $width = '100%', $height = '600px'){

        $this->assign('name', $name);
        $this->assign('content', $content);
        $this->assign('width', $width);
        $this->assign('height', $height);

        $this->display('Widget:ueditor');

    }

}